//
//  main.m
//  lzl-4-7
//
//  Created by 刘振霖 on 16/4/7.
//  Copyright © 2016年 刘振霖. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Atom.h"
#import "Animal.h"
#import "Cat.h"
#import "Mouse.h"
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
        
        /*Atom * atom=[[Atom alloc]init];
        NSLog(@"Atom chemical element name:%@",atom.chemicalElement);
        */
       // Animal * ani=[[Animal alloc]init];
        
        Cat * c=[[Cat alloc]init];
        
        c.name=@"汤姆";
        
        Mouse * m=[[Mouse alloc]init];
        m.name=@"杰瑞";
        
        NSArray * arr=@[c,m];
        for(int i=0;i<arr.count;i++){
            Animal * ani=arr[i];
            [ani eat];
            [ani sleep];
        }
        
    }
    return 0;
}
